/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Model;

import java.util.ArrayList;

/**
 *
 * @author HaTschE
 */
public class Indicator {

    public void setFlag(boolean flag) {
        for (int i = 0; i < years.size(); i++) {
            this.years.get(i).setFlag(flag);
        }
        for (int j = 0; j < getSubIndicators().size(); j++) {
            getSubIndicators().get(j).setFlag(flag);
        }
    }
    private String name;

    public String getName() {
        return name;
    }
    private ArrayList<Indicator> subIndicators;

    public ArrayList<Indicator> getSubIndicators() {
        return subIndicators;
    }

    public void setSubIndicators(ArrayList<Indicator> subIndicators) {
        this.subIndicators = subIndicators;
    }
    private ArrayList<Year> years;

    public ArrayList<Year> getYears() {
        return years;
    }

    public void setYears(ArrayList<Year> years) {
        this.years = years;
    }

    public Indicator(String name) {
        this.name = name;
        subIndicators = new ArrayList<>();
        years = new ArrayList<>();
    }

    public void addSubIndicator(Indicator indicator) {
        subIndicators.add(indicator);
    }
}
